package com.wangp.mywrite.util;

import cn.hutool.http.Header;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import java.util.HashMap;
import java.util.Map;
import lombok.Data;

import java.util.Arrays;
import java.util.IntSummaryStatistics;
import java.util.List;

@Data
public class MyUtils {
    
    List<Student> studentList;
    
    @Data
    static class Student{
        private String name;
        private int age;
        private double balance;

        private int protectValue;//用来计算
    }


    public static void main(String[] args) {
        Map<String,Object> paramMap = new HashMap<>();
        paramMap.put("username","aHVhbmd6aGFu");
        paramMap.put("password","SHouMTM4MjQ3Nzc1OTk=");
        paramMap.put("service","aHR0cDovL3Rlc3QtYWZpLWNvbnNvbGUuZmluYW5jZS5hbC5jb20vIy8=");
        paramMap.put("platform","afi-information-console");
        HttpResponse response = HttpRequest.post("http://sso.dev.al.com:9527/sso_auth/")
                .header(Header.USER_AGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36")
                .header("Content-Type", "application/x-www-form-urlencoded")
                .form(paramMap)
                .execute();
        System.out.println(response);

    }
}
